<?php

// [ 登录处理 ]

namespace app\common\logic;
use think\Session;
use think\Cookie;

class Login
{
    public static function run($member)
    {
        // 写入Session
        Session::set('member',$member);
        
        // 写入Cookie
        Cookie::set('memberId',$member['id'],0);
        Cookie::set('memberRole',$member['role'],0);
        Cookie::set('memberCert',!$member['status'],0);

        return true;
    }
}